package redis

import (
	"fmt"
	"time"
)

// 储存订单信息
func RedisSetOrderData(userid int, data string) {
	key := fmt.Sprintf("order_data_userid%d_:", userid)
	fmt.Println("添加的数据", key, data)
	RedisDB.Set(key, data, time.Minute*60)
}

// 获取订单信息
func RedisGetOrderData(userid int) string {
	key := fmt.Sprintf("order_data_userid%d_:", userid)
	return RedisDB.Get(key).Val()
}
